package JAVASE515;

public class JAVAswap {
    public static void main(String[] argc){
        int[] arr={1,2,3,4,5};
        for (int i = 0; i < arr.length; i++) {
                int x=arr[i];
                arr[i]=arr[arr.length-1-i];
                arr[arr.length-1-i]=x;
                if(i==arr.length-1-i)break;
        }
        for (int i = 0; i < arr.length; i++) System.out.println(arr[i]);
    }
}
